package com.luzhikun.upload_1;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.IOException;
import java.io.PrintWriter;

public class RegisterServlet extends HttpServlet {

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        // 获取输入流
        ServletInputStream is = request.getInputStream();
        // 创建输出流
        PrintWriter writer = response.getWriter();
        int len = -1;
        byte[] bytes = new byte[1024];
        while ((len = is.read(bytes)) != -1) {
            String s1 = new String(bytes, 0, len);
            writer.println(s1);
        }

    }
}
